<template>
	<view class="agreement">
		<topTitle :styles="{back:true,title:title,color:'#fff'}" />
		<view class="padding">
			<rich-text :nodes="content"></rich-text>
		</view>
	</view>
</template>

<script>
	import topTitle from "@/components/topTitle.vue"
	export default {
		components:{
			topTitle
		},
		data(){
			return{
				content:"",
				title:""
			}
		},
		onLoad(option) {
			console.log(option,'----------123')
			var key = option.key
			this.getAgreement(key)
		},
		methods:{
			getAgreement(key){
				this.$http({
					url:'/api/sys_config/'+key,
					method:'get',
					success:result=>{
						console.log(result,'123')
						this.title = result.data.title
						this.content = result.data.content
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	page{
		width: 100%;
		height: 100%;
	}
	.agreement{
		width: 100%;
		height: 100%;	
	}
	.padding{
		padding: 10px;
		box-sizing: border-box;
	}
</style>